-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Django 4.1 #111
Conversation
pre-commit is... miscofngured |
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
==========================================
- Coverage 62.38% 61.99% -0.39%
==========================================
Files 3 3
Lines 420 421 +1
Branches 116 116
==========================================
- Hits 262 261 -1
- Misses 116 117 +1
- Partials 42 43 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
* Strip IDENTITY related suffixes auto fields are getting on Django 4.1. These suffixes are upsetting redshift.
Updated documentation and setup.cfg as well |
exclude: | ||
- django-version: '4.0' | ||
python-version: '3.7' | ||
- django-version: '4.1' | ||
python-version: '3.7' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memo: django 4.1 supports python 3.8 or later
https://docs.djangoproject.com/en/4.1/releases/4.1/
@@ -17,6 +17,7 @@ python = | |||
DJANGO = | |||
3.2: dj32 | |||
4.0: dj40 | |||
4.1: dj41 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need dj41 in envlist
(line 2) and deps
(line 32)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
The suffix related to IDENTITY appeared because Django 4.1 now creates AutoField with Therefore, the current PR will create tables with |
Hmmm... I thought the serial stayed since the tests checked the resulting SQL and without the suffixes it was the same as on earlier Django versions. |
Where should I look? The AutoField data_type was already overriden by redshift-engine to |
@shimizukawa the way I see it is that the tests running directly on Postgres will become increasingly hard to maintain with each PostgreSQL/Django release (and redshift evolves too). Maybe the best approach would be to fork the whole code from Django 4.0.x instead of inheriting from the Postgres engine from whatever Django is there underneath. Plus the Postgres implementation and redshift will become increasingly distinct 🤔 I tried to pinpoint what has changed between 4.0.x and 4.1.x but all I got was additional IntegerField generated with primary_key set to True. (copied |
Thank you @fizyk, |
Subject: Django 4.1 support
Feature or Bugfix
Purpose
Detail
Relates